#include <stdio.h>
#include <arpa/inet.h>

int main()
{
    #if 0
    char *ip = "192.168.3.103";
    printf("ip = %s\n",ip);
    unsigned int value = 0;
    unsigned char* value_char = (char*)&value;
    inet_pton(AF_INET,ip,&value);
    printf("ip_int = %d\n",value);
    for(int i = 0;i < 4;i++)
    {
        if(i < 3)
            printf("%d.",*(value_char+i));
        else
            printf("%d\n",*(value_char+i));
    }
    #endif

    #if 1
    unsigned char ip_arr[] = {192,168,3,103};
    char ip[16] = "";
    inet_ntop(AF_INET,ip_arr,ip,16);
    printf("ip = %s\n",ip);
    #endif 
    return 0;
}